This page is part of the FHIR Specification (v1.6.0: STU 3 Ballot 4). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions
The official URL for this profile is:
http://hl7.org/fhir/StructureDefinition/cqif-questionnaire
A questionnaire with the ability to specify behavior associated with questions or groups of questions
This profile was published on Sat, May 30, 2015 00:00+1000 as a draft by Health Level Seven, Inc. - CDS WG.
Description of Profiles, Differentials, Snapshots, and how the XML and JSON presentations work.
This structure is derived from Questionnaire.
This structure is derived from Questionnaire.
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
Questionnaire | 0..* | A questionnaire with the ability to specify behavior associated with questions or groups of questions | ||
item | 0..* | BackboneElement | ||
cqif-basic-condition | 0..1 | string | A condition that determines whether or not the group is applicable URL: http://hl7.org/fhir/StructureDefinition/cqif-basic-condition | |
cqif-basic-initialValue | 0..1 | string | An expression that provides the initial value for the answer to the question URL: http://hl7.org/fhir/StructureDefinition/cqif-basic-initialValue | |
cqif-basic-calculatedValue | 0..1 | string | An expression that provides a calculated value for the answer to the question URL: http://hl7.org/fhir/StructureDefinition/cqif-basic-calculatedValue | |
cqif-basic-library | 0..* | Reference(Library) | A library containing logic referenced by the questionnaire URL: http://hl7.org/fhir/StructureDefinition/cqif-basic-library | |
Documentation for this format |
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
Questionnaire | I | 0..* | A questionnaire with the ability to specify behavior associated with questions or groups of questions dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource que-2: The link ids for groups and questions must be unique within the questionnaire | |
id | ∑ | 0..1 | id | Logical id of this artifact |
meta | ∑ | 0..1 | Meta | Metadata about the resource |
implicitRules | ?!∑ | 0..1 | uri | A set of rules under which this content was created |
language | 0..1 | code | Language of the resource content Binding: Common Languages (extensible) | |
text | I | 0..1 | Narrative | Text summary of the resource, for human interpretation |
contained | 0..* | Resource | Contained, inline Resources | |
cqif-basic-library | I | 0..* | Reference(Library) | A library containing logic referenced by the questionnaire URL: http://hl7.org/fhir/StructureDefinition/cqif-basic-library ele-1: All FHIR elements must have a @value or children ext-1: Must have either extensions or value[x], not both |
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored |
url | ∑ | 0..1 | uri | Globally unique logical identifier for questionnaire |
identifier | ∑ | 0..* | Identifier | External identifiers for this questionnaire |
version | ∑ | 0..1 | string | Logical identifier for this version of Questionnaire |
status | ?!∑ | 1..1 | code | draft | published | retired Binding: QuestionnaireStatus (required) |
date | ∑ | 0..1 | dateTime | Date this version was authored |
publisher | ∑ | 0..1 | string | Organization/individual who designed the questionnaire |
telecom | ∑ | 0..* | ContactPoint | Contact information of the publisher |
useContext | ∑ | 0..* | CodeableConcept | Questionnaire intends to support these contexts Binding: Context of Use ValueSet (extensible) |
title | ∑ | 0..1 | string | Name for the questionnaire |
concept | ∑ | 0..* | Coding | Concept that represents the overall questionnaire Binding: Questionnaire Question Codes (example) |
subjectType | ∑ | 0..* | code | Resource that can be subject of QuestionnaireResponse Binding: ResourceType (required) |
item | I | 0..* | BackboneElement | Questions and sections within the Questionnaire que-9: Read-only can't be specified for "display" items que-8: Default values can't be specified for groups or display items que-6: Required and repeat aren't permitted for display items que-5: Only 'choice' items can have options que-4: A question cannot have both option and options que-3: Display items cannot have a "concept" asserted que-10: Maximum length can only be declared for simple question types que-1: Group items must have nested items, display items cannot have nested items |
id | 0..1 | string | xml:id (or equivalent in JSON) | |
cqif-basic-condition | I | 0..1 | string | A condition that determines whether or not the group is applicable URL: http://hl7.org/fhir/StructureDefinition/cqif-basic-condition ele-1: All FHIR elements must have a @value or children ext-1: Must have either extensions or value[x], not both |
cqif-basic-initialValue | I | 0..1 | string | An expression that provides the initial value for the answer to the question URL: http://hl7.org/fhir/StructureDefinition/cqif-basic-initialValue ele-1: All FHIR elements must have a @value or children ext-1: Must have either extensions or value[x], not both |
cqif-basic-calculatedValue | I | 0..1 | string | An expression that provides a calculated value for the answer to the question URL: http://hl7.org/fhir/StructureDefinition/cqif-basic-calculatedValue ele-1: All FHIR elements must have a @value or children ext-1: Must have either extensions or value[x], not both |
modifierExtension | ?!∑ | 0..* | Extension | Extensions that cannot be ignored |
linkId | 0..1 | string | To link questionnaire with questionnaire response | |
concept | ∑I | 0..* | Coding | Concept that represents this item within in a questionnaire Binding: Questionnaire Question Codes (example) |
prefix | 0..1 | string | E.g. "1(a)", "2.5.3" | |
text | ∑ | 0..1 | string | Primary text for the item |
type | 1..1 | code | group | display | question | boolean | decimal | integer | date | dateTime + Binding: QuestionnaireItemType (required) | |
enableWhen | ?!∑I | 0..* | BackboneElement | Only allow data when: que-7: enableWhen must contain either an 'answer' or an 'answered' element |
id | 0..1 | string | xml:id (or equivalent in JSON) | |
extension | 0..* | Extension | Additional Content defined by implementations | |
modifierExtension | ?!∑ | 0..* | Extension | Extensions that cannot be ignored |
question | 1..1 | string | Question that determines whether item is enabled | |
hasAnswer | I | 0..1 | boolean | Enable when answered or not |
answer[x] | I | 0..1 | boolean, decimal, integer, date, dateTime, instant, time, string, uri, Attachment, Coding, Quantity, Reference(Resource) | Value question must have |
required | I | 0..1 | boolean | Whether the item must be included in data results |
repeats | I | 0..1 | boolean | Whether the item may repeat |
readOnly | I | 0..1 | boolean | Don't allow human editing |
maxLength | I | 0..1 | integer | No more than this many characters |
options | I | 0..1 | Reference(ValueSet) | Valueset containing permitted answers |
option | I | 0..* | BackboneElement | Permitted answer |
id | 0..1 | string | xml:id (or equivalent in JSON) | |
extension | 0..* | Extension | Additional Content defined by implementations | |
modifierExtension | ?!∑ | 0..* | Extension | Extensions that cannot be ignored |
value[x] | 1..1 | integer, date, time, string, Coding | Answer value Binding: Questionnaire Answer Codes (example) | |
initial[x] | I | 0..1 | boolean, decimal, integer, date, dateTime, instant, time, string, uri, Attachment, Coding, Quantity, Reference(Resource) | Initial presumed answer for question |
item | I | 0..* | Unknown reference to #Questionnaire:cqif-questionnaire.item Nested questionnaire items | |
Documentation for this format |
todo
This structure is derived from Questionnaire.
Differential View
This structure is derived from Questionnaire.
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
Questionnaire | 0..* | A questionnaire with the ability to specify behavior associated with questions or groups of questions | ||
item | 0..* | BackboneElement | ||
cqif-basic-condition | 0..1 | string | A condition that determines whether or not the group is applicable URL: http://hl7.org/fhir/StructureDefinition/cqif-basic-condition | |
cqif-basic-initialValue | 0..1 | string | An expression that provides the initial value for the answer to the question URL: http://hl7.org/fhir/StructureDefinition/cqif-basic-initialValue | |
cqif-basic-calculatedValue | 0..1 | string | An expression that provides a calculated value for the answer to the question URL: http://hl7.org/fhir/StructureDefinition/cqif-basic-calculatedValue | |
cqif-basic-library | 0..* | Reference(Library) | A library containing logic referenced by the questionnaire URL: http://hl7.org/fhir/StructureDefinition/cqif-basic-library | |
Documentation for this format |
Snapshot View
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
Questionnaire | I | 0..* | A questionnaire with the ability to specify behavior associated with questions or groups of questions dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource que-2: The link ids for groups and questions must be unique within the questionnaire | |
id | ∑ | 0..1 | id | Logical id of this artifact |
meta | ∑ | 0..1 | Meta | Metadata about the resource |
implicitRules | ?!∑ | 0..1 | uri | A set of rules under which this content was created |
language | 0..1 | code | Language of the resource content Binding: Common Languages (extensible) | |
text | I | 0..1 | Narrative | Text summary of the resource, for human interpretation |
contained | 0..* | Resource | Contained, inline Resources | |
cqif-basic-library | I | 0..* | Reference(Library) | A library containing logic referenced by the questionnaire URL: http://hl7.org/fhir/StructureDefinition/cqif-basic-library ele-1: All FHIR elements must have a @value or children ext-1: Must have either extensions or value[x], not both |
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored |
url | ∑ | 0..1 | uri | Globally unique logical identifier for questionnaire |
identifier | ∑ | 0..* | Identifier | External identifiers for this questionnaire |
version | ∑ | 0..1 | string | Logical identifier for this version of Questionnaire |
status | ?!∑ | 1..1 | code | draft | published | retired Binding: QuestionnaireStatus (required) |
date | ∑ | 0..1 | dateTime | Date this version was authored |
publisher | ∑ | 0..1 | string | Organization/individual who designed the questionnaire |
telecom | ∑ | 0..* | ContactPoint | Contact information of the publisher |
useContext | ∑ | 0..* | CodeableConcept | Questionnaire intends to support these contexts Binding: Context of Use ValueSet (extensible) |
title | ∑ | 0..1 | string | Name for the questionnaire |
concept | ∑ | 0..* | Coding | Concept that represents the overall questionnaire Binding: Questionnaire Question Codes (example) |
subjectType | ∑ | 0..* | code | Resource that can be subject of QuestionnaireResponse Binding: ResourceType (required) |
item | I | 0..* | BackboneElement | Questions and sections within the Questionnaire que-9: Read-only can't be specified for "display" items que-8: Default values can't be specified for groups or display items que-6: Required and repeat aren't permitted for display items que-5: Only 'choice' items can have options que-4: A question cannot have both option and options que-3: Display items cannot have a "concept" asserted que-10: Maximum length can only be declared for simple question types que-1: Group items must have nested items, display items cannot have nested items |
id | 0..1 | string | xml:id (or equivalent in JSON) | |
cqif-basic-condition | I | 0..1 | string | A condition that determines whether or not the group is applicable URL: http://hl7.org/fhir/StructureDefinition/cqif-basic-condition ele-1: All FHIR elements must have a @value or children ext-1: Must have either extensions or value[x], not both |
cqif-basic-initialValue | I | 0..1 | string | An expression that provides the initial value for the answer to the question URL: http://hl7.org/fhir/StructureDefinition/cqif-basic-initialValue ele-1: All FHIR elements must have a @value or children ext-1: Must have either extensions or value[x], not both |
cqif-basic-calculatedValue | I | 0..1 | string | An expression that provides a calculated value for the answer to the question URL: http://hl7.org/fhir/StructureDefinition/cqif-basic-calculatedValue ele-1: All FHIR elements must have a @value or children ext-1: Must have either extensions or value[x], not both |
modifierExtension | ?!∑ | 0..* | Extension | Extensions that cannot be ignored |
linkId | 0..1 | string | To link questionnaire with questionnaire response | |
concept | ∑I | 0..* | Coding | Concept that represents this item within in a questionnaire Binding: Questionnaire Question Codes (example) |
prefix | 0..1 | string | E.g. "1(a)", "2.5.3" | |
text | ∑ | 0..1 | string | Primary text for the item |
type | 1..1 | code | group | display | question | boolean | decimal | integer | date | dateTime + Binding: QuestionnaireItemType (required) | |
enableWhen | ?!∑I | 0..* | BackboneElement | Only allow data when: que-7: enableWhen must contain either an 'answer' or an 'answered' element |
id | 0..1 | string | xml:id (or equivalent in JSON) | |
extension | 0..* | Extension | Additional Content defined by implementations | |
modifierExtension | ?!∑ | 0..* | Extension | Extensions that cannot be ignored |
question | 1..1 | string | Question that determines whether item is enabled | |
hasAnswer | I | 0..1 | boolean | Enable when answered or not |
answer[x] | I | 0..1 | boolean, decimal, integer, date, dateTime, instant, time, string, uri, Attachment, Coding, Quantity, Reference(Resource) | Value question must have |
required | I | 0..1 | boolean | Whether the item must be included in data results |
repeats | I | 0..1 | boolean | Whether the item may repeat |
readOnly | I | 0..1 | boolean | Don't allow human editing |
maxLength | I | 0..1 | integer | No more than this many characters |
options | I | 0..1 | Reference(ValueSet) | Valueset containing permitted answers |
option | I | 0..* | BackboneElement | Permitted answer |
id | 0..1 | string | xml:id (or equivalent in JSON) | |
extension | 0..* | Extension | Additional Content defined by implementations | |
modifierExtension | ?!∑ | 0..* | Extension | Extensions that cannot be ignored |
value[x] | 1..1 | integer, date, time, string, Coding | Answer value Binding: Questionnaire Answer Codes (example) | |
initial[x] | I | 0..1 | boolean, decimal, integer, date, dateTime, instant, time, string, uri, Attachment, Coding, Quantity, Reference(Resource) | Initial presumed answer for question |
item | I | 0..* | Unknown reference to #Questionnaire:cqif-questionnaire.item Nested questionnaire items | |
Documentation for this format |
XML Template
JSON Template
todo
Other representations of profile: Schematron
Path | Name | Conformance | ValueSet |
Questionnaire.language | Common Languages | extensible | Common Languages |
Questionnaire.status | QuestionnaireStatus | required | QuestionnaireStatus |
Questionnaire.useContext | Context of Use ValueSet | extensible | Context of Use ValueSet |
Questionnaire.concept | Questionnaire Question Codes | example | Questionnaire Question Codes |
Questionnaire.subjectType | ResourceType | required | ResourceType |
Questionnaire.item.concept | Questionnaire Question Codes | example | Questionnaire Question Codes |
Questionnaire.item.type | QuestionnaireItemType | required | QuestionnaireItemType |
Questionnaire.item.option.value[x] | Questionnaire Answer Codes | example | Questionnaire Answer Codes |
Id | Path | Details | Requirements |
dom-2 | Questionnaire | If the resource is contained in another resource, it SHALL NOT contain nested Resources XPath: not(parent::f:contained and f:contained) | |
dom-1 | Questionnaire | If the resource is contained in another resource, it SHALL NOT contain any narrative XPath: not(parent::f:contained and f:text) | |
dom-4 | Questionnaire | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated XPath: not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated)) | |
dom-3 | Questionnaire | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource XPath: not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))])) | |
que-2 | Questionnaire | The link ids for groups and questions must be unique within the questionnaire XPath: count(descendant::f:linkId/@value)=count(distinct-values(descendant::f:linkId/@value)) | |
ele-1 | Questionnaire.extension | All FHIR elements must have a @value or children XPath: @value|f:*|h:div | |
ext-1 | Questionnaire.extension | Must have either extensions or value[x], not both XPath: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')]) | |
que-9 | Questionnaire.item | Read-only can't be specified for "display" items XPath: not(f:type/@value='display' and f:readOnly) | |
que-8 | Questionnaire.item | Default values can't be specified for groups or display items XPath: not(f:type/@value=('group', 'display') and f:*[starts-with(local-name(.), 'initial')]) | |
que-6 | Questionnaire.item | Required and repeat aren't permitted for display items XPath: not(f:type/@value='display' and (f:required or f:repeats)) | |
que-5 | Questionnaire.item | Only 'choice' items can have options XPath: f:type/@value=('choice','open-choice') or not(f:option or f:options) | |
que-4 | Questionnaire.item | A question cannot have both option and options XPath: not(f:options and f:option) | |
que-3 | Questionnaire.item | Display items cannot have a "concept" asserted XPath: not(f:type/@value='display' and f:concept) | |
que-10 | Questionnaire.item | Maximum length can only be declared for simple question types XPath: f:type/@value=('boolean', 'decimal', 'integer', 'open-choice', 'string', 'text', 'url') or not(f:maxLength) | |
que-1 | Questionnaire.item | Group items must have nested items, display items cannot have nested items XPath: not((f:type/@value='group' and not(f:item)) or (f:type/@value='display' and f:item)) | |
ele-1 | Questionnaire.item.extension | All FHIR elements must have a @value or children XPath: @value|f:*|h:div | |
ext-1 | Questionnaire.item.extension | Must have either extensions or value[x], not both XPath: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')]) | |
ele-1 | Questionnaire.item.extension | All FHIR elements must have a @value or children XPath: @value|f:*|h:div | |
ext-1 | Questionnaire.item.extension | Must have either extensions or value[x], not both XPath: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')]) | |
ele-1 | Questionnaire.item.extension | All FHIR elements must have a @value or children XPath: @value|f:*|h:div | |
ext-1 | Questionnaire.item.extension | Must have either extensions or value[x], not both XPath: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')]) | |
ele-1 | Questionnaire.item.extension | All FHIR elements must have a @value or children XPath: @value|f:*|h:div | |
ext-1 | Questionnaire.item.extension | Must have either extensions or value[x], not both XPath: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')]) | |
que-7 | Questionnaire.item.enableWhen | enableWhen must contain either an 'answer' or an 'answered' element XPath: count(*[starts-with(local-name(.), 'answer')]|answered) = 1 |